<?php
$file = __DIR__.DS.'test.bz2';
if (file_exists($file)) {
	var_dump(filesize($file));
	$bz2 = new XBzip2($file, XBzip2::BZIP2_MODE_READ);
	var_dump($bz2->read());
} else {
	$bz2 = new XBzip2($file, XBzip2::BZIP2_MODE_WRITE);
	$text = '我爱北京天安门, 天安门上太阳伞';
	$bz2->write($text);
}
